import java.util.Scanner;
import java.util.Vector;
public class ScoreTest {
    public static void main(String[] args) {
        Vector v1 = new Vector();
        Scanner scanner = new Scanner(System.in);
        float maxscore =0;
        while (true) {
            System.out.println("输入学生成绩");
            float FloatScore = scanner.nextFloat();
            if (FloatScore < 0) {
                break;
            }
            Float Score = Float.valueOf(FloatScore);

            v1.addElement(FloatScore);

            if (maxscore < FloatScore) {
                maxscore = FloatScore;
            }
        }
        for (int i = 0; i < v1.size(); i++) {
            Object o = v1.elementAt(i);
            float score = (Float)o;
            char grade = ' ';
            if(maxscore-score<=10){
                grade ='A';
            }
            else if (maxscore-score<=20){
                grade = 'B';
            }
            else if (maxscore-score<=30){
                grade = 'C';
            }
            else {
                grade = 'D';
            }
//            System.out.println(score);
            System.out.println("student:"+i+" "+"score:"+score+"grade:"+grade);
        }
        System.out.println("最高分:"+maxscore);



    }




}
